package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * Communication entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "communications")
@GeneratorKey(tableName = "communications")
public class CommunicationVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 7461585672648493489L;

	@Column(name = "communication", nullable = false, length = 50)
	private String communication;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", nullable = false)
	private CustomerVO customer;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_communication_type_id", nullable = false)
	private NomCommunicatioTypeVO nomCommunicatioType;

	/** default constructor */
	public CommunicationVO() {
		super();
	}

	/** @return the communication */
	public String getCommunication() {
		return this.communication;
	}

	/** @return the customer */
	public CustomerVO getCustomer() {
		return this.customer;
	}

	/** @return the nomCommunicatioType */
	public NomCommunicatioTypeVO getNomCommunicatioType() {
		return this.nomCommunicatioType;
	}

	/**
	 * @param communication
	 *            the communication to set
	 */
	public void setCommunication(String communication) {
		this.communication = communication;
	}

	/**
	 * @param customer
	 *            the customer to set
	 */
	public void setCustomer(CustomerVO customer) {
		this.customer = customer;
	}

	/**
	 * @param nomCommunicatioType
	 *            the nomCommunicatioType to set
	 */
	public void setNomCommunicatioType(NomCommunicatioTypeVO nomCommunicatioType) {
		this.nomCommunicatioType = nomCommunicatioType;
	}

}